import { InputQuestion, QuestionBase, SelectQuestion, TextQuestion } from '@/components/public-template';
import { TextTable } from '@/components/public-template';
import { TableBase } from '@/components/public-template';

class HomeService {
  getQuestions() {
    const questions: QuestionBase<any>[] = [
      new InputQuestion({
        key: 'name',
        label: '名称',
        value: null
      })
    ];
    return questions;
  }
  getTables() {
    const tables: TableBase<any>[] = [
      new TextTable({
        key: 'key',
        value: null,
        type: 'slot',
        columns: { width: 60 },
        state: {
          slotName: 'fileImg'
        }
      }),
      new TextTable({
        key: 'key',
        value: '文件名称',
        type: 'slot',
        columns: { width: 200 },
        state: {
          slotName: 'fileName'
        }
      }),
      new TextTable({
        key: 'key',
        value: '大小',
        type: 'slot',
        state: {
          slotName: 'size'
        }
      }),
      new TextTable({
        key: 'key',
        value: '修改人',
        type: 'slot',
        state: {
          slotName: 'modifier'
        }
      }),
      new TextTable({
        key: 'key',
        value: '修改时间',
        type: 'slot',
        state: {
          slotName: 'updateTime'
        }
      })
    ];
    return tables;
  }
}

export default new HomeService();
